﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Routing;
using htmlHelpers.Enums;

namespace htmlHelpers.Html
{
    public class HtmlProperties
    {
        private ViewContext _viewContext;
        private Type _objectType;
        private String _id ;
        public String Id
        {
            get
            {
                if (String.IsNullOrEmpty(_id))
                    _id = Resolvers.HtmlResolver.GenerateHtmlValidId(this._viewContext, _objectType);
                return _id;
            }
            set { _id = value; }
        }
        public String Name { get; set; }
        public String Value { get; set; }
        public IDictionary<string, object> HtmlAttributes { get; set; }
        public IDictionary<string, object> CssAttributes { get; set; }

        public HtmlProperties(ViewContext view, Type objType)
        {
            this._viewContext = view;
            this._objectType = objType;
        }
    }
}
